from vec import *

WIDTH = 300
HEIGHT = 300

BACK_COLOR = (0, 0, 0)

class MyTriangle:
    def __init__ (self,pos,long,clr):
        self.pos=pos
        self.long=long
        self.clr=clr
        
    def Update(self):
        pass
    
    def Draw(self):
        a=Vec2(4,7)
        b=Vec2(-4,7)
        a.normalize()
        b.normalize()
        a*=self.long
        b*=self.long
        a+=self.pos
        b+=self.pos
#        screen.draw.line((self.pos.x, self.pos.y), (self.pos.x+self.long, self.pos.y+self.long), self.clr)
        screen.draw.line((self.pos.x, self.pos.y), (a.x, a.y), self.clr)
        screen.draw.line((self.pos.x, self.pos.y), (b.x, b.y), self.clr)
        screen.draw.line((a.x,a.y),(b.x,b.y),self.clr)

tr=MyTriangle(Vec2(150,100),100,(0,200,200))

def draw():
    screen.clear()
    screen.fill(BACK_COLOR)
    tr.Draw()